ICFP: G: Curry-Howard for Callbacks
نویسنده
چکیده
Event-driven programming has become an increasingly popular programming model for lightweight concurrency. It has been used successfully in applications ranging from message-passing in Concurrent ML [10] to asynchronous I/O operations in Node.js [11] to the dynamic behavior of GUIs in eXene [3], among many others. The unifying idea is that an event is a computation that executes independently from other events and can eventually return a value. Unfortunately, event-driven programming can be difficult because it is based on a combination of features that do not play well together: callbacks and state. Callbacks are higher-order first-class functions. When combined with stateful abstractions like Ivars in OCaml’s Async library [7] or Promises in Scala [5], the resulting programs can be convoluted and errorprone. Many event-driven languages have tried to alleviate this difficulty by introducing various abstractions for serializing and synchronizing events. Unfortunately this has been done in a somewhat ad hoc way, resulting in many competing abstractions formulated in slightly different ways. For example, while events in Go [1] and Lwt [12] are thought of as lightweight threads, in Scala they are thought of as write-once shared state in the form of Futures [5], and in Concurrent ML they are thought of as concurrent processes [10]. This work aims to understand the space of eventdriven programming by identifying the structures common to it with an intuitive perspective from temporal logic. Under this interpretation, an event is a computation that can eventually return a value, and so we identify its type with the “eventually” proposition A of temporal logic.
منابع مشابه
The Essence of Event-Driven Programming
Event-driven programming is based on a natural abstraction: an event is a computation that can eventually return a value. This paper exploits the intuition relating events and time by drawing a Curry-Howard correspondence between a functional event-driven programming language and a linear-time temporal logic. In this logic, the eventually proposition ♦A describes the type of events, and Girard’...
متن کاملThe Many Worlds of Modal {\lambda}-calculi: I. Curry-Howard for Necessity, Possibility and Time
Preface 2
متن کاملReview : Ruy J . G . B . de Queiroz et al . , The Functional Interpretation of Logical Deduction , World Scientific 2012
Judging by its programmatic title, and on a superficial examination of its table of contents (pp. vii–x), the book under review looks, prima facie, as if yet another monograph on the so-called “Curry-Howard Correspondence” (henceforth: CHC – some people use to say, even, “Curry-Howard Isomporhism”, casually adding more proper names in the credit-label), also known, following William Howard, as ...
متن کاملCurry-Howard Terms for Linear Logic
In this paper we 1. provide a natural deduction system for full rst-order linear logic, 2. introduce Curry{Howard{style terms for this version of linear logic, 3. extend the notion of substitution of Curry-Howard terms for term variables, 4. deene the reduction rules for the Curry{Howard terms and 5. outline a proof of the strong normalization for the full system of linear logic using a develop...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2016